<?php

class ErrorController extends FController {

    public function actionIndex() {
        
        $error = Yii::app()->errorHandler->error;
        if ($error) {
            $error = Yii::app()->errorHandler->error;
            //Func::dump($error);
            if (Yii::app()->request->isAjaxRequest){
                echo $error['message'];
            }else{
                
            }
            
        }
        $this->renderPartial('index', array("error"=>$error));
    }

}
